<?php

/*
 * Niken Larasati
 * larasati.n@students.amikom.ac.id
 */

class jenis_pergi extends CI_Controller{
    public function __construct() {
        parent::__construct();
    }
    
    function form_jenis_pergi(){
        $this->template->load('halaman_v','form_jenis_pergi_v');
    }
    
    function tambah(){
        if($this->input->post('tambah') != NULL);
        {
            $data['id_jnsprg'] = $this->input->post('id_jns_prg');
            $data['jns_prg'] = $this->input->post('jns_prg');
            
            $this->load->model('umum_m');
            $this->umum_m->tambah('jns_prg',$data);
            $this->template->load('halaman_v','form_jenis_pergi_v');
        }
    }
    
    function ambil_data(){
        $this->load->model('jns_pergi_m');
        $data['data'] = $this->jns_pergi_m->ambil_data();
        $this->template->load('halaman_v','form_jenis_pergi_v',$data);
    }
}
?>

